package com.example.skinmanager.UI;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.skinmanager.Factory.SkinFactory;
import com.example.skinmanager.Manager.SkinManager;

public class BaseActivity extends AppCompatActivity {
    SkinFactory skinFactory;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        SkinManager.getInstance().init(getApplicationContext());
        skinFactory = new SkinFactory(getDelegate());
        getLayoutInflater().setFactory2(skinFactory);
        super.onCreate(savedInstanceState);
    }
    public void apply(){
        skinFactory.apply();
    }
}
